﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display {
    import flash.events.*;
    import flash.display.*;
    import Engine.Helpers.*;
    import flash.text.*;

    public class GameSprite extends Sprite implements IToolTipTarget {

        public static const PADDING:int = 5;
        public static const HPADDING:int = 2;

        protected var m_toolTip:String;
        protected var m_normalScale:Number = -1;
        protected var m_rollOverScale:Number = 1.1;
        protected var m_textField:TextField = null;
        protected var m_hideCursor:Boolean = false;

        public function GameSprite(){
            this.addEventListener(MouseEvent.ROLL_OVER, this.onRollOver);
            this.addEventListener(MouseEvent.ROLL_OUT, this.onRollOut);
        }
        public function set toolTip(_arg1:String):void{
            if (_arg1 != this.m_toolTip){
                this.m_toolTip = _arg1;
            };
        }
        public function set hideCursor(_arg1:Boolean):void{
            this.m_hideCursor = _arg1;
        }
        public function set normalScale(_arg1:Number):void{
            this.m_normalScale = _arg1;
        }
        public function set rollOverScale(_arg1:Number):void{
            this.m_rollOverScale = _arg1;
        }
        protected function onRollOver(_arg1:MouseEvent):void{
            Global.ui.showToolTip(this);
            if (this.m_hideCursor){
                UI.pushBlankCursor();
            };
        }
        protected function onRollOut(_arg1:MouseEvent):void{
            if (this.m_normalScale > 0){
                this.scaleX = (this.scaleY = this.m_normalScale);
            };
            if (this.m_hideCursor){
                UI.popBlankCursor();
            };
            Global.ui.hideToolTip(this);
        }
        public function getToolTipStatus():String{
            return (this.m_toolTip);
        }
        public function getToolTipHeader():String{
            return (null);
        }
        public function getToolTipNotes():String{
            return (null);
        }
        public function getToolTipAction():String{
            return (null);
        }
        public function toolTipFollowsMouse():Boolean{
            return (true);
        }
        public function getToolTipVisibility():Boolean{
            return (true);
        }
        public function getPosition():Vector3{
            return (new Vector3(this.x, this.y));
        }
        public function getToolTipPosition():Vector3{
            return (this.getPosition());
        }
        public function getToolTipScreenOffset():Vector2{
            return (null);
        }
        public function getDimensions():Vector3{
            return (new Vector3(this.width, this.height));
        }
        public function getToolTipFloatOffset():int{
            return (0);
        }

    }
}//package Display 
